package com.cy.pj.sys.dao;

import com.cy.pj.sys.pojo.Approval;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ApprovalDao {
    /**
     * 新增一条审批表记录
     *
     * @param approval
     */
    void insertApproval(Approval approval);

    /**
     * 条件查询
     * @param approval
     * @return
     */
    List<Approval> selectApprovals(Approval approval);
    /**
     * 基于审批人或申请人加(审批表编号,模块,状态)查找审批表id
     *
     * @param userName,status
     * @return
     */
    List<Long> selectApproval(Long userName, Integer status);

    /**
     * 基于id 查找审批表
     *
     * @param approvalId
     * @return
     */
    Approval selectById(Long approvalId);

    /**
     * 更新审批表记录
     *
     * @param approval
     */
    void updateApproval(Approval approval);
}
